package mode.states18;

public class Order extends AbstractEvent{

    @Override
    public void order(Shopping shopping, Boolean isConfirm) {
        if(isConfirm){
            System.out.println("恭喜您，下单成功");
            shopping.setEvent(Shopping.PAY_STATE);//确定下单，进入支付页面
        }else {
            System.out.println("订单页面取消成功，回到主页面");
            shopping.setEvent(Shopping.REFUND);
        }
    }

}
